package com.jl.jlapp.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jl.jlapp.R;
import com.jl.jlapp.eneity.ActivityMessageByUserIdModel.ResultDataBean.ActivityMessageListBean;

import java.text.SimpleDateFormat;
import java.util.List;

public class ActivityMessageListAdapter
  extends BaseQuickAdapter<ActivityMessageListBean, BaseViewHolder>
{
  public ActivityMessageListAdapter(@LayoutRes int paramInt, @Nullable List<ActivityMessageListBean> paramList)
  {
    super(paramInt, paramList);
  }
  
  protected void convert(BaseViewHolder paramBaseViewHolder, ActivityMessageListBean paramActivityMessageListBean)
  {
    String str = paramActivityMessageListBean.getActivityInformation().getMessagePicUrl();
    ImageView localImageView = (ImageView)paramBaseViewHolder.getView(R.id.activity_img);
    paramBaseViewHolder.setText(R.id.activity_name, paramActivityMessageListBean.getActivityInformation().getName());
    paramBaseViewHolder.setText(R.id.activity_introduce, paramActivityMessageListBean.getActivityInformation().getIntroduction());
    paramBaseViewHolder.setText(R.id.tv_date, new SimpleDateFormat("MM-dd HH:mm").format(Long.valueOf(paramActivityMessageListBean.getGetTime())));
    if ((str == null) || (str == ""))
    {
      Glide.with(paramBaseViewHolder.itemView.getContext()).asBitmap().apply(new RequestOptions().placeholder(R.drawable.img_noimg_banner_middle).error(R.drawable.img_noimg_banner_middle)).load(R.drawable.img_noimg_banner_middle).into(localImageView);
      return;
    }
    Glide.with(paramBaseViewHolder.itemView.getContext()).asBitmap().apply(new RequestOptions().placeholder(R.drawable.img_lose_banner_middle).error(R.drawable.img_lose_banner_middle)).load("http://117.158.178.202:8001/JLMIS/" + str).into(localImageView);
  }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/adapter/ActivityMessageListAdapter.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */